<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .tuxing {
            width: 500px;
            height: 300px;
            margin: 20px auto;
            display: flex;
            justify-content: space-around;
            border-left: 1px solid black;
            border-bottom: 1px solid black;
            position: relative;
            align-items: end;
        }

        .zhizhu {
            width: 50px;
            background-color: pink;
            text-align: center;
        }

        .zhizhu h4 {
            position: absolute;
            bottom: -30px;
        }
    </style>
</head>

<body>
    <!-- <div class="tuxing">
        <div class="zhizhu" style="height: 100px;">
            <span>123</span>
            <h4>第一季度</h4>
        </div>
        <div class="zhizhu" style="height: 120px;">
            <span>345</span>
            <h4>第二季度</h4>
        </div>
        <div class="zhizhu" style="height: 50px;">
            <span>456</span>
            <h4>第三季度</h4>
        </div>
        <div class="zhizhu" style="height: 150px;">
            <span>678</span>
            <h4>第四季度</h4>
        </div>
    </div> -->

    <script>

        let arr = []
        for (let i = 1; i <= 4; i++) {
            arr.push(prompt(`请输入第${i}季度的数据：`))
        }

        document.write(`<div class="tuxing">`)
        for (let j = 0; j < arr.length; j++) {
            document.write(`
                <div class="zhizhu" style="height: ${arr[j]}px;">
                <span>${arr[j]}</span>
                <h4>第${j + 1}季度</h4>
                </div>
            `)
        }
        document.write(`</div>`)
    </script>
</body>


</html>